package cn.glinks.liuhe.widget.timeline;

import java.io.Serializable;
import java.util.Date;

import cn.glinks.liuhe.utils.TimeTransformUtils;

public class TimeLineModel implements Serializable {
    private String year = "9999";
    private String timeStr = "99-99 99:99";

    private Date date;
    private String comment = "";
    private String advice = "";

    public TimeLineModel() {
    }

    public TimeLineModel(String year, String timeStr) {
        this.year = year;
        this.timeStr = timeStr;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getTimeStr() {
        return timeStr;
    }

    public void setTimeStr(String timeStr) {
        this.timeStr = timeStr;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
        // 解析Date数据
        this.year = TimeTransformUtils.dateToStr("yyyy", date);
        this.timeStr = TimeTransformUtils.dateToStr("MM-dd HH:mm", date);
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getAdvice() {
        return advice;
    }

    public void setAdvice(String advice) {
        this.advice = advice;
    }
}
